Package-level declarations
This is the top level entrypoint to use the SDK. It contains components to discover, connect, and retrieve a GoPro.
SDK Initialization
Before performing any operations, the SDK must first be initialized with a desired coroutine scope and a platform-specific OgpSdkAppContext.
// App context is platform-specific context passed from application
val sdk = OgpSdk(Dispatchers.IO, appContext)
GoPro Identifier
GoPro devices on all network mediums and their resulting GoPro objects are always identified by a GoProId which consists of the last 4 digits of the serial number.
SDK Overview
The SDK maintains a run-time database of GoPro objects that can be retrieved by GoProId. It manages storing network connections (identified by GoProId) and binding / unbinding these to GoPro objects as needed.
It is the user's responsibility to establish a connection via OgpSdk.connect. The SDK will then bind this to any existing GoPro objects
At any time the user can use OgpSdk.getGoPro to retrieve a GoPro which will be bound to all available network connections.
Discovering
The first step to connecting is to discover a GoPro device via OgpSdk.discover:
// Discover and take the first device we find
val device = sdk.discover(NetworkType.BLE).first()
Note that the user can freely choose any combination of network types.
Connecting
Discovered devices can be connected to via OgpSdk.connect
// Connect (assume success)
val goproId = sdk.connect(device).getOrThrow()
On success, the SDK will store this connection and bind to any pre-existing GoPro objects.
GoPro Retrieval
At any time, the user can attempt to retrieve a GoPro object (by its GoProId) via OgpSdk.getGoPro:
val gopro = sdk.getGoPro(goproId)
This will succeed as long as their is at least one available network connection. If there are no available network connections, a DeviceNotFound exception will be returned in the Failure
result and the user must establish a connection before proceeding.
For information on how to work with the retrieved GoPro, see the GoPro package TODO link.
This is the top level entrypoint to use the SDK. It contains components to discover, connect, and retrieve a com.gopro.open_gopro.gopro.GoPro.
SDK Initialization
Before performing any operations, the SDK must first be initialized with a desired coroutine scope and a platform-specific OgpSdkAppContext.
// App context is platform-specific context passed from application
val sdk = OgpSdk(Dispatchers.IO, appContext)
GoPro Identifier
GoPro devices on all network mediums and their resulting com.gopro.open_gopro.gopro.GoPro objects are always identified by a GoProId which consists of the last 4 digits of the serial number.
SDK Overview
The SDK maintains a run-time database of com.gopro.open_gopro.gopro.GoPro objects that can be retrieved by GoProId. It manages storing network connections (identified by GoProId) and binding / unbinding these to com.gopro.open_gopro.gopro.GoPro objects as needed.
It is the user's responsibility to establish a connection via OgpSdk.connect. The SDK will then bind this to any existing com.gopro.open_gopro.gopro.GoPro objects
At any time the user can use OgpSdk.getGoPro to retrieve a com.gopro.open_gopro.gopro.GoPro which will be bound to all available network connections.
Discovering
The first step to connecting is to discover a GoPro device via OgpSdk.discover:
// Discover and take the first device we find
val device = sdk.discover(NetworkType.BLE).first()
Note that the user can freely choose any combination of network types.
Connecting
Discovered devices can be connected to via OgpSdk.connect
// Connect (assume success)
val goproId = sdk.connect(device).getOrThrow()
On success, the SDK will store this connection and bind to any pre-existing com.gopro.open_gopro.gopro.GoPro objects.
GoPro Retrieval
At any time, the user can attempt to retrieve a com.gopro.open_gopro.gopro.GoPro object (by its GoProId) via OgpSdk.getGoPro:
val gopro = sdk.getGoPro(goproId)
This will succeed as long as their is at least one available network connection. If there are no available network connections, a DeviceNotFound exception will be returned in the Failure
result and the user must establish a connection before proceeding.
For information on how to work with the retrieved com.gopro.open_gopro.gopro.GoPro, see the GoPro package TODO link.
This is the top level entrypoint to use the SDK. It contains components to discover, connect, and retrieve a GoPro.
SDK Initialization
Before performing any operations, the SDK must first be initialized with a desired coroutine scope and a platform-specific OgpSdkAppContext.
// App context is platform-specific context passed from application
val sdk = OgpSdk(Dispatchers.IO, appContext)
GoPro Identifier
GoPro devices on all network mediums and their resulting GoPro objects are always identified by a GoProId which consists of the last 4 digits of the serial number.
SDK Overview
The SDK maintains a run-time database of GoPro objects that can be retrieved by GoProId. It manages storing network connections (identified by GoProId) and binding / unbinding these to GoPro objects as needed.
It is the user's responsibility to establish a connection via OgpSdk.connect. The SDK will then bind this to any existing GoPro objects
At any time the user can use OgpSdk.getGoPro to retrieve a GoPro which will be bound to all available network connections.
Discovering
The first step to connecting is to discover a GoPro device via OgpSdk.discover:
// Discover and take the first device we find
val device = sdk.discover(NetworkType.BLE).first()
Note that the user can freely choose any combination of network types.
Connecting
Discovered devices can be connected to via OgpSdk.connect
// Connect (assume success)
val goproId = sdk.connect(device).getOrThrow()
On success, the SDK will store this connection and bind to any pre-existing GoPro objects.
GoPro Retrieval
At any time, the user can attempt to retrieve a GoPro object (by its GoProId) via OgpSdk.getGoPro:
val gopro = sdk.getGoPro(goproId)
This will succeed as long as their is at least one available network connection. If there are no available network connections, a DeviceNotFound exception will be returned in the Failure
result and the user must establish a connection before proceeding.
For information on how to work with the retrieved GoPro, see the GoPro package TODO link.
Types
Per-network-type additional connection request information.
Represent IOExceptions and connectivity issues.
The top level SDK interface
Platform-specific context needed to initialize the OGP SDK
Network-type-specific GoPro device discovery results